Dynomotion

Group: DynoMotion Message: 4348 From: Toby Rule Date: 3/27/2012
Subject: CompileAndLoadCoff in KMotion_dotNet

Hello,

 

I’m using the KMotion_dotNet library for a motion control application.  I can successfully configure the motion control axes by the following methods:

 

a) The “Config and Flash” screen in KMotion,

b) Compiling and running a c-program from the “C Program” screen in KMotion

c) Downloading the C-program into user memory and configure so that it launches on power-up.

 

However, I can’t do something like this:

 

String result = kmcontroller.CompileAndLoadCoff(0, "C:\\init.c", false);

 

I’m not getting anything in String result except a bunch of white space, and nothing in error or message logs, and it’s not creating a .out file

 

I’m not having any other problems moving the axes using the KMotion_dotNet library once I get it configured.

 

Any hints?

 

Thanks,

 

Toby Rule

 

 

The information contained in this transmission is intended only for the person or entity
to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive
material. If you are not the intended recipient, please contact the sender immediately
and destroy the material in its entirety, whether electronic or hard copy. You are
notified that any review, retransmission, copying, disclosure, dissemination or other
use of, or taking of any action in reliance upon this information by persons or entities 
other than the intended recipient is prohibited.
Group: DynoMotion Message: 4349 From: Brad Murry Date: 3/27/2012
Subject: Re: CompileAndLoadCoff in KMotion_dotNet

Hello Toby,

 

 

Where is your KMotion_dotNet.dll located?

 

It should remain in the //Kmotion4xx/Kmotion/Release   folder.

 

 

Does the provided c# console app work?

 

 

It is using a convenience method::

_Controller.ExecuteProgram(1, TheCFile, false);

 

Where a file stored variable TheCFile is compiled/offed and executed in one line.

 

 

-Brad Murry

 

From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of Toby Rule
Sent: Tuesday, March 27, 2012 7:08 AM
To: DynoMotion@yahoogroups.com
Subject: [DynoMotion] CompileAndLoadCoff in KMotion_dotNet

 

 

Hello,

 

I’m using the KMotion_dotNet library for a motion control application.  I can successfully configure the motion control axes by the following methods:

 

a) The “Config and Flash” screen in KMotion,

b) Compiling and running a c-program from the “C Program” screen in KMotion

c) Downloading the C-program into user memory and configure so that it launches on power-up.

 

However, I can’t do something like this:

 

String result = kmcontroller.CompileAndLoadCoff(0, "C:\\init.c", false);

 

I’m not getting anything in String result except a bunch of white space, and nothing in error or message logs, and it’s not creating a .out file

 

I’m not having any other problems moving the axes using the KMotion_dotNet library once I get it configured.

 

Any hints?

 

Thanks,

 

Toby Rule

 

 

The information contained in this transmission is intended only for the person or entity
to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive
material. If you are not the intended recipient, please contact the sender immediately
and destroy the material in its entirety, whether electronic or hard copy. You are
notified that any review, retransmission, copying, disclosure, dissemination or other
use of, or taking of any action in reliance upon this information by persons or entities 
other than the intended recipient is prohibited.
  

Group: DynoMotion Message: 4351 From: Tom Kerekes Date: 3/27/2012
Subject: Re: CompileAndLoadCoff in KMotion_dotNet
Hi Toby,
 
There is a problem with CompileAndLoadCoff reporting errors.  This has been fixed but not yet released.  If there are no errors it should work.  If you were to step through the code you could see the error that is not being passed back to the .NET level.
 
The first parameter is the Thread to use. Valid numbers are 1-7.  0 is the KFLOP System Thread and not allowed.   That may be your problem. 
 
Regards
TK

Group: DynoMotion Message: 4405 From: Toby Rule Date: 3/28/2012
Subject: Re: CompileAndLoadCoff in KMotion_dotNet
Attachments :

    Tom and Brad,

     

    Thanks for the replies. The problem was the zero thread number.  I am having flashbacks to a couple years ago when I made the same mistake using the C++ framework.   So the following works fine:

     

    kmcontroller.CompileAndLoadCoff(1, "C:\\init.c", true);

     

    Regards,

     

    Toby

     

    From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of Tom Kerekes
    Sent: Tuesday, March 27, 2012 11:13 AM
    To: DynoMotion@yahoogroups.com
    Subject: Re: [DynoMotion] CompileAndLoadCoff in KMotion_dotNet

     

     

    Hi Toby,

     

    There is a problem with CompileAndLoadCoff reporting errors.  This has been fixed but not yet released.  If there are no errors it should work.  If you were to step through the code you could see the error that is not being passed back to the .NET level.

     

    The first parameter is the Thread to use. Valid numbers are 1-7.  0 is the KFLOP System Thread and not allowed.   That may be your problem. 

     

    Regards

    TK

     

    From: Toby Rule <trule@...>
    To: "DynoMotion@yahoogroups.com" <DynoMotion@yahoogroups.com>
    Sent: Tuesday, March 27, 2012 7:07 AM
    Subject: [DynoMotion] CompileAndLoadCoff in KMotion_dotNet

     

     

    Hello,

     

    I’m using the KMotion_dotNet library for a motion control application.  I can successfully configure the motion control axes by the following methods:

     

    a) The “Config and Flash” screen in KMotion,

    b) Compiling and running a c-program from the “C Program” screen in KMotion

    c) Downloading the C-program into user memory and configure so that it launches on power-up.

     

    However, I can’t do something like this:

     

    String result = kmcontroller.CompileAndLoadCoff(0, "C:\\init.c", false);

     

    I’m not getting anything in String result except a bunch of white space, and nothing in error or message logs, and it’s not creating a .out file

     

    I’m not having any other problems moving the axes using the KMotion_dotNet library once I get it configured.

     

    Any hints?

     

    Thanks,

     

    Toby Rule

     

     

    The information contained in this transmission is intended only for the person or entity
    to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive
    material. If you are not the intended recipient, please contact the sender immediately
    and destroy the material in its entirety, whether electronic or hard copy. You are
    notified that any review, retransmission, copying, disclosure, dissemination or other
    use of, or taking of any action in reliance upon this information by persons or entities 
    other than the intended recipient is prohibited.

     

    The information contained in this transmission is intended only for the person or entity
    to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive
    material. If you are not the intended recipient, please contact the sender immediately
    and destroy the material in its entirety, whether electronic or hard copy. You are
    notified that any review, retransmission, copying, disclosure, dissemination or other
    use of, or taking of any action in reliance upon this information by persons or entities 
    other than the intended recipient is prohibited.
    Group: DynoMotion Message: 4406 From: Brad Murry Date: 3/28/2012
    Subject: Re: CompileAndLoadCoff in KMotion_dotNet

     

    Sounds like I need to add some exceptions on the program call methods that will throw an error if an invalid thread is requested.

     

    -Brad

    From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of Toby Rule
    Sent: Wednesday, March 28, 2012 7:04 AM
    To: DynoMotion@yahoogroups.com
    Subject: RE: [DynoMotion] CompileAndLoadCoff in KMotion_dotNet

     

     

    Tom and Brad,

     

    Thanks for the replies. The problem was the zero thread number.  I am having flashbacks to a couple years ago when I made the same mistake using the C++ framework.   So the following works fine:

     

    kmcontroller.CompileAndLoadCoff(1, "C:\\init.c", true);

     

    Regards,

     

    Toby

     

    From: DynoMotion@yahoogroups.com [mailto:DynoMotion@yahoogroups.com] On Behalf Of Tom Kerekes
    Sent: Tuesday, March 27, 2012 11:13 AM
    To: DynoMotion@yahoogroups.com
    Subject: Re: [DynoMotion] CompileAndLoadCoff in KMotion_dotNet

     

     

    Hi Toby,

     

    There is a problem with CompileAndLoadCoff reporting errors.  This has been fixed but not yet released.  If there are no errors it should work.  If you were to step through the code you could see the error that is not being passed back to the .NET level.

     

    The first parameter is the Thread to use. Valid numbers are 1-7.  0 is the KFLOP System Thread and not allowed.   That may be your problem. 

     

    Regards

    TK

     

    From: Toby Rule <trule@...>
    To: "DynoMotion@yahoogroups.com" <DynoMotion@yahoogroups.com>
    Sent: Tuesday, March 27, 2012 7:07 AM
    Subject: [DynoMotion] CompileAndLoadCoff in KMotion_dotNet

     

     

    Hello,

     

    I’m using the KMotion_dotNet library for a motion control application.  I can successfully configure the motion control axes by the following methods:

     

    a) The “Config and Flash” screen in KMotion,

    b) Compiling and running a c-program from the “C Program” screen in KMotion

    c) Downloading the C-program into user memory and configure so that it launches on power-up.

     

    However, I can’t do something like this:

     

    String result = kmcontroller.CompileAndLoadCoff(0, "C:\\init.c", false);

     

    I’m not getting anything in String result except a bunch of white space, and nothing in error or message logs, and it’s not creating a .out file

     

    I’m not having any other problems moving the axes using the KMotion_dotNet library once I get it configured.

     

    Any hints?

     

    Thanks,

     

    Toby Rule

     

     

    The information contained in this transmission is intended only for the person or entity
    to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive
    material. If you are not the intended recipient, please contact the sender immediately
    and destroy the material in its entirety, whether electronic or hard copy. You are
    notified that any review, retransmission, copying, disclosure, dissemination or other
    use of, or taking of any action in reliance upon this information by persons or entities 
    other than the intended recipient is prohibited.

     

    The information contained in this transmission is intended only for the person or entity
    to which it is addressed and may contain II-VI Proprietary and/or II-VI Business Sensitive
    material. If you are not the intended recipient, please contact the sender immediately
    and destroy the material in its entirety, whether electronic or hard copy. You are
    notified that any review, retransmission, copying, disclosure, dissemination or other
    use of, or taking of any action in reliance upon this information by persons or entities 
    other than the intended recipient is prohibited.